<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>自定义动画</title>
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
      <button id="btn1">将下边的绿色方块放大3倍，速度慢</button>
      <button id="btn2">重置到原始大小，在500ms内完成</button>
      <div id="box" style="background:green;height:100px;width:100px;margin:6px;">
      </div>
      <script>
          $(function(){//请在此行后编写代码
               $('#btn1').click(function(){
                $('#box').animate({
                    width:'300px',
                    height:'300px'
                },2000)
               })

               $('#btn2').click(function(){
                $('#box').animate({
                    width:'100px',
                    height:'100px'
                },500)
               })
          });
     </script>
</body>
</html>
